package com.qcu.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qcu.entity.AiAppoint;
import com.qcu.entity.Appointment;
import com.qcu.service.AiAppointService;
import com.qcu.mapper.AiAppointMapper;
import org.springframework.stereotype.Service;

/**
* @author MyComputer
* @description 针对表【ai_appoint】的数据库操作Service实现
* @createDate 2025-04-24 21:56:35
*/
@Service
public class AiAppointServiceImpl extends ServiceImpl<AiAppointMapper, AiAppoint>
    implements AiAppointService{


    @Override
    public AiAppoint getOne(AiAppoint appointment) {
        LambdaQueryWrapper<AiAppoint> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(AiAppoint::getUsername, appointment.getUsername());
        queryWrapper.eq(AiAppoint::getIdCard, appointment.getIdCard());
        queryWrapper.eq(AiAppoint::getDepartment, appointment.getDepartment());
        queryWrapper.eq(AiAppoint::getDate, appointment.getDate());
        AiAppoint appointmentDB = baseMapper.selectOne(queryWrapper);
        return appointmentDB;
    }
}




